package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.SchemeOpenRecordService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrcomponent.integration.FwCompSchemeOpenRecordClient;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrcomponent.integration.dto.AddSchemeOpenRecordRespDto;
import com.wicket.okrcomponent.integration.dto.AddSchemeOpenRecordReqDto;
import com.wicket.okrcomponent.integration.dto.DeleteSchemeOpenRecordRespDto;
import com.wicket.okrcomponent.integration.dto.DeleteSchemeOpenRecordReqDto;
import com.wicket.okrcomponent.integration.dto.ReleaseSchemeOpenRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.ReleaseSchemeOpenRecordComReqDto;
import com.wicket.okrcomponent.integration.dto.ArchiveSchemeOpenRecordRespDto;
import com.wicket.okrcomponent.integration.dto.ArchiveSchemeOpenRecordReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordListRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordListReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffSchemeOpenRecordDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcomponent.integration.FwCompConfSchemeClient;
import com.wicket.okrcomponent.integration.dto.QueryFilterSchemeOpenListComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryFilterSchemeOpenListComReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffConfSchemeDto;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeListRespDto;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeListReqDto;
import com.wicket.okrcomponent.integration.dto.AddSchemeOpenRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.AddSchemeOpenRecordComReqDto;
import com.wicket.okrcomponent.integration.dto.AddSpaceSchemeOpenRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.AddSpaceSchemeOpenRecordComReqDto;
import com.wicket.okrcomponent.integration.dto.AddOpenRecordAuthorizationComRespDto;
import com.wicket.okrcomponent.integration.dto.AddOpenRecordAuthorizationComReqDto;
import com.wicket.okrcomponent.integration.dto.UpdateSchOpenRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.UpdateSchOpenRecordComReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComReqDto;
import com.wicket.okrcomponent.integration.FwCompDivineDataClient;
import com.wicket.okrframework.integration.FwBaseBaseClient;
import com.wicket.okrframework.integration.FwBaseOrgClient;
import com.wicket.okrapp.integration.FwAppEvaThemeClient;
import com.wicket.okrcomponent.integration.dto.QueryApplexConrelListRespDto;
import com.wicket.okrcomponent.integration.dto.QueryApplexConrelListReqDto;
import com.wicket.okrcomponent.integration.dto.QueryOutputParametersDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryOutputParametersDetailComReqDto;
import com.wicket.okrframework.integration.dto.BatchQuerySpaceComRespDto;
import com.wicket.okrframework.integration.dto.BatchQuerySpaceComReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryOrgListBorderRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryOrgListBorderReqDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaThemeListRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaThemeListReqDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaTempRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaTempReqDto;
import com.wicket.okrcomponent.integration.dto.QueryOpenObjectUsageRelationshipListRespDto;
import com.wicket.okrcomponent.integration.dto.QueryOpenObjectUsageRelationshipListReqDto;
import com.wicket.okrpbff.biz.service.dto.common.BffOpenObjectUsageRelationshipDto;
import com.wicket.okrframework.integration.FwBaseSecurityClient;
import com.wicket.okrframework.integration.dto.AddSoftwareAuthorizationComRespDto;
import com.wicket.okrframework.integration.dto.AddSoftwareAuthorizationComReqDto;
import com.wicket.okrframework.integration.dto.QuerySpaceDetailComRespDto;
import com.wicket.okrframework.integration.dto.QuerySpaceDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.ImplementUpgradeSingleCriterionCloneResultRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementUpgradeSingleCriterionCloneResultReqDto;
import com.wicket.okrcomponent.integration.dto.SetCustomResultRespDto;
import com.wicket.okrcomponent.integration.dto.SetCustomResultReqDto;
import com.wicket.okrcomponent.integration.dto.ConfItemResultDto;
import com.wicket.okrcomponent.integration.dto.BatchUpdateUpgradeCriterionCloneResultRespDto;
import com.wicket.okrcomponent.integration.dto.BatchUpdateUpgradeCriterionCloneResultReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "SchemeOpenRecord", tags = {"SchemeOpenRecord"})
@RestController
// @RequestMapping("/poms/schemeOpenRecord/")
public class SchemeOpenRecordController {
    @Autowired
    SchemeOpenRecordService schemeOpenRecordService;

    /**
   * B2-3查询方案开通记录列表（平台）
   * gen by moon at 9/14/2022, 5:56:56 PM
   */
    @PostMapping("/oms/platform/schemeOpenRecord/querySchemeOpenRecordList")
    @ApiOperation(value = "B2-3查询方案开通记录列表（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySchemeOpenRecordListRespDto> querySchemeOpenRecordList(@RequestBody(required=false) @Validated BffQuerySchemeOpenRecordListReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.querySchemeOpenRecordList(reqDTO));
    }

    /**
     * B2-3新增固定时间方案开通记录（平台）
     */
    @PostMapping("/oms/platform/schemeOpenRecord/addFixedTimeSchemeOpenRecord")
    @ApiOperation(value = "B2-3新增固定时间方案开通记录（平台）", response = OkrResult.class)
    public OkrResult<BffAddFixedTimeSchemeOpenRecordRespDto> addFixedTimeSchemeOpenRecord(@RequestBody(required = false) @Validated BffAddFixedTimeSchemeOpenRecordReqDto reqDTO) {
        return OkrResult.success(schemeOpenRecordService.addFixedTimeSchemeOpenRecord(reqDTO));
    }

    /**
   * B2-3升级开通方案（平台）
   * gen by moon at 9/8/2022, 4:07:15 AM
   */
    @PostMapping("/oms/platform/schemeOpenRecord/archiveSchemeOpenRecord")
    @ApiOperation(value = "B2-3升级开通方案（平台）", response = OkrResult.class)
    public OkrResult<BffArchiveSchemeOpenRecordRespDto> archiveSchemeOpenRecord(@RequestBody(required=false) @Validated BffArchiveSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.archiveSchemeOpenRecord(reqDTO));
    }

    /**
   * B2-3发布方案开通记录(平台)
   * gen by moon at 9/8/2022, 4:07:19 AM
   */
    @PostMapping("/oms/platform/schemeOpenRecord/releaseSchemeOpenRecord")
    @ApiOperation(value = "B2-3发布方案开通记录(平台)", response = OkrResult.class)
    public OkrResult<BffReleaseSchemeOpenRecordRespDto> releaseSchemeOpenRecord(@RequestBody(required=false) @Validated BffReleaseSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.releaseSchemeOpenRecord(reqDTO));
    }

    /**
   * B2-3新增方案开通记录(管理)
   * gen by moon at 12/7/2022, 2:38:58 AM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/addSchemeOpenRecord")
    @ApiOperation(value = "B2-3新增方案开通记录(管理)", response = OkrResult.class)
    public OkrResult<BffAddSchemeOpenRecordRespDto> addSchemeOpenRecord(@RequestBody(required=false) @Validated BffAddSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.addSchemeOpenRecord(reqDTO));
    }
/**
   * B2-3查询方案开通记录详情（平台）
   * gen by moon at 8/15/2022, 10:27:44 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/querySchemeOpenRecordDetail")
    @ApiOperation(value = "B2-3查询方案开通记录详情（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySchemeOpenRecordDetailRespDto> querySchemeOpenRecordDetail(@RequestBody(required=false) @Validated BffQuerySchemeOpenRecordDetailReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.querySchemeOpenRecordDetail(reqDTO));
    }
/**
   * B2-3删除方案开通记录(平台）
   * gen by moon at 9/8/2022, 4:07:14 AM
   */
    @PostMapping("/oms/platform/schemeOpenRecord/deleteSchemeOpenRecord")
    @ApiOperation(value = "B2-3删除方案开通记录(平台）", response = OkrResult.class)
    public OkrResult<BffDeleteSchemeOpenRecordRespDto> deleteSchemeOpenRecord(@RequestBody(required=false) @Validated BffDeleteSchemeOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.deleteSchemeOpenRecord(reqDTO));
    }
/**
   * B2-3查询主题方案开通记录列表(边界)
   * gen by moon at 9/18/2022, 1:59:06 AM
   */
    @PostMapping("/oms/platform/schemeOpenRecord/queryThemeSchemeOpenRecordListBorder")
    @ApiOperation(value = "B2-3查询主题方案开通记录列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryThemeSchemeOpenRecordListBorderRespDto> queryThemeSchemeOpenRecordListBorder(@RequestBody(required=false) @Validated BffQueryThemeSchemeOpenRecordListBorderReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.queryThemeSchemeOpenRecordListBorder(reqDTO));
    }
/**
   * B2修改开通记录(管理)
   * gen by moon at 5/6/2023, 9:42:31 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/updateSchOpenRecord")
    @ApiOperation(value = "B2修改开通记录(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateSchOpenRecordRespDto> updateSchOpenRecord(@RequestBody(required=false) @Validated BffUpdateSchOpenRecordReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.updateSchOpenRecord(reqDTO));
    }
/**
   * B2-3查询应用实例配置关系列表(管理)
   * gen by moon at 5/7/2023, 10:32:53 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/queryApplexConrelListBorder")
    @ApiOperation(value = "B2-3查询应用实例配置关系列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryApplexConrelListBorderRespDto> queryApplexConrelListBorder(@RequestBody(required=false) @Validated BffQueryApplexConrelListBorderReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.queryApplexConrelListBorder(reqDTO));
    }
/**
   * B3查询开通对象使用关系列表(管理)
   * gen by moon at 5/9/2023, 6:45:00 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/queryOpenObjectUsageRelationshipList")
    @ApiOperation(value = "B3查询开通对象使用关系列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryOpenObjectUsageRelationshipListRespDto> queryOpenObjectUsageRelationshipList(@RequestBody(required=false) @Validated BffQueryOpenObjectUsageRelationshipListReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.queryOpenObjectUsageRelationshipList(reqDTO));
    }
/**
   * B2升级单题标准克隆答案(管理)
   * gen by moon at 5/27/2023, 5:20:05 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/implementUpgradeSingleCriterionCloneResult")
    @ApiOperation(value = "B2升级单题标准克隆答案(管理)", response = OkrResult.class)
    public OkrResult<BffImplementUpgradeSingleCriterionCloneResultRespDto> implementUpgradeSingleCriterionCloneResult(@RequestBody(required=false) @Validated BffImplementUpgradeSingleCriterionCloneResultReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.implementUpgradeSingleCriterionCloneResult(reqDTO));
    }
/**
   * B2恢复标准克隆答案(管理)
   * gen by moon at 5/27/2023, 5:20:11 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/implementRecoverCriterionResult")
    @ApiOperation(value = "B2恢复标准克隆答案(管理)", response = OkrResult.class)
    public OkrResult<BffImplementRecoverCriterionResultRespDto> implementRecoverCriterionResult(@RequestBody(required=false) @Validated BffImplementRecoverCriterionResultReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.implementRecoverCriterionResult(reqDTO));
    }
/**
   * B2初设定制答案(管理)
   * gen by moon at 6/4/2023, 3:50:02 PM
   */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/setFirstSetCustomResult")
    @ApiOperation(value = "B2初设定制答案(管理)", response = OkrResult.class)
    public OkrResult<BffSetFirstSetCustomResultRespDto> setFirstSetCustomResult(@RequestBody(required=false) @Validated BffSetFirstSetCustomResultReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.setFirstSetCustomResult(reqDTO));
    }

    /**
     * B2批量改升级标准克隆答案(管理)
     * gen by moon at 6/4/2023, 3:50:02 PM
     */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/batchUpdateUpgradeCriterionCloneResult")
    @ApiOperation(value = "B2批量改升级标准克隆答案(管理)", response = OkrResult.class)
    public OkrResult<BffBatchUpdateUpgradeCriterionCloneResultRespDto> batchUpdateUpgradeCriterionCloneResult(@RequestBody(required=false) @Validated BffBatchUpdateUpgradeCriterionCloneResultReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.batchUpdateUpgradeCriterionCloneResult(reqDTO));
    }

    /**
     * B2设置重设定制答案(管理)
     * gen by moon at 6/4/2023, 3:50:02 PM
     */
    @PostMapping("/oms/platform/mgt/schemeOpenRecord/setFollowSetCustomResult")
    @ApiOperation(value = "B2设置重设定制答案(管理)", response = OkrResult.class)
    public OkrResult<BffSetFollowSetCustomResultRespDto> setFollowSetCustomResult(@RequestBody(required=false) @Validated BffSetFollowSetCustomResultReqDto reqDTO){
        return OkrResult.success(schemeOpenRecordService.setFollowSetCustomResult(reqDTO));
    }

 


}

